<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of MainView
 *
 * @author mateusz.ledzewicz
 */
class ViewNetwork_teached extends NetworkScreen{
    //put your code here
        
    public function load() {
        parent::load();
        $this->chooseView('network_teached');
        
    }
    
    protected function listLoad() {
        $list = '
            <tr>
                <td>'.$this->getVar('header_Network_teached_LABEL_name').'</td>
                <td>'.$this->getVar('header_Network_teached_LABEL_id_network_prepared').'</td>
                <td>'.$this->getVar('header_Network_teached_LABEL_id_training_file').'</td>
                <td>'.$this->getVar('header_Network_teached_LABEL_rate').'</td>
                <td>'.$this->getVar('header_Network_teached_LABEL_momentum').'</td>
                <td>Edycja</td>
            </tr>';
        
        foreach($this->specialVariables['list'] as $r)
        {
            $list .= '
            <tr>
                <td>'.$r->name.'</td>
                <td>'.$r->id_network_prepared.'</td>
                <td>'.$r->id_training_file.'</td>
                <td>'.$r->rate.'</td>
                <td>'.$r->momentum.'</td>
                
                <td>
                     <a href="?step=testing&action=run&id='.$r->id_network_teached.'"><span class="glyphicon glyphicon-briefcase" aria-hidden="true"></span></a>
                        <a href="?step=charts&action=value&id_train='.$r->id_network_teached.'"><span class="glyphicon glyphicon-signal" aria-hidden="true"></span></a>     
                </td>
            </tr>';     

         }
         
         
        $this->setVar('addNewLink', '');
        $this->setVar('type', 'nauczone');
        $this->setVar('list', $list);
    }
    
    protected function formLoad() {
        $training_file = '';
        foreach($this->specialVariables['training_files'] as $file)
        {
            $training_file .= '<option value="'.$file->id_training_data.'">'.$file->name.' '.$file->dateTo.' '.$file->number.'</option>';
        }
        $this->setVar('training_file', $training_file);
    }
  
}

?>
